Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Agent Namespace / Log Class / Write Method / Write(LogMessageSeverity,String,IMessageSourceProvider,String,Exception,LogWriteMode,String,String,String,String,Object[]) Method
The severity enum value of the log message.
The name of the originating log system (e.g. "Log4Net").
An IMessageSourceProvider object which supplies the source information about this log message.
The effective user name associated with the execution task which issued the log message. (If null, Loupe will determine the user name automatically.)
An Exception object attached to this log message, or null if none.
A LogWriteMode enum value indicating whether to simply queue the log message and return quickly, or to wait for the log message to be committed to disk before returning.
An XML document (as a string) with extended details about the message.
The application subsystem or logging category that the log message is associated with, which supports a dot-delimited hierarchy (e.g. the logger name in log4net).
A simple single-line message caption. (Will not be processed for formatting.)
Additional multi-line descriptive message (or may be null) which can be a format string followed by corresponding args.
A variable number of arguments referenced by the formatted description string (or no arguments to skip formatting).

In This Topic
    Write(LogMessageSeverity,String,IMessageSourceProvider,String,Exception,LogWriteMode,String,String,String,String,Object[]) Method
    In This Topic
    Write a complete log message to the Loupe central log, optionally extended with XML details and broadest API features.
    Syntax
    'Declaration
     
    
    Public Overloads Shared Sub Write( _
       ByVal severity As LogMessageSeverity, _
       ByVal logSystem As String, _
       ByVal sourceProvider As IMessageSourceProvider, _
       ByVal userName As String, _
       ByVal exception As Exception, _
       ByVal writeMode As LogWriteMode, _
       ByVal detailsXml As String, _
       ByVal category As String, _
       ByVal caption As String, _
       ByVal description As String, _
       ByVal ParamArray args() As Object _
    ) 

    Parameters

    severity
    The severity enum value of the log message.
    logSystem
    The name of the originating log system (e.g. "Log4Net").
    sourceProvider
    An IMessageSourceProvider object which supplies the source information about this log message.
    userName
    The effective user name associated with the execution task which issued the log message. (If null, Loupe will determine the user name automatically.)
    exception
    An Exception object attached to this log message, or null if none.
    writeMode
    A LogWriteMode enum value indicating whether to simply queue the log message and return quickly, or to wait for the log message to be committed to disk before returning.
    detailsXml
    An XML document (as a string) with extended details about the message.
    category
    The application subsystem or logging category that the log message is associated with, which supports a dot-delimited hierarchy (e.g. the logger name in log4net).
    caption
    A simple single-line message caption. (Will not be processed for formatting.)
    description
    Additional multi-line descriptive message (or may be null) which can be a format string followed by corresponding args.
    args
    A variable number of arguments referenced by the formatted description string (or no arguments to skip formatting).
    Remarks

    This method provides the most complete API for issuing messages into Loupe, allowing log system, user name, and a customized message source provider to be specified. These parameters allow bridge logic to support interfacing to Loupe from third-party logging systems like log4net, including from your own in-house system.

    The sourceProvider is expected to remain valid for this message until this call returns, after which the values have been read and copied. Loupe does not keep a reference to the sourceProvider object after this call returns, so it may then be discarded, reused, or altered however your implementation requires.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also